package com.hq.door.dto;

import java.util.ArrayList;
import java.util.List;

import com.hq.door.pojo.TClass;
import com.hq.door.pojo.TInstitute;
import com.hq.door.pojo.TMajor;

public class MajorInfo {
	String majorname;
	List<ClassInfo> classInfos;
	
	public MajorInfo() {
		classInfos = new ArrayList<ClassInfo>();
	}
	public String getMajorname() {
		return majorname;
	}
	public void setMajorname(String majorname) {
		this.majorname = majorname;
	}
	public List<ClassInfo> getClassInfos() {
		return classInfos;
	}
	public void setClassInfos(List<ClassInfo> classInfos) {
		this.classInfos = classInfos;
	}
	public MajorInfo getIns(TMajor tMajor){
		this.majorname = tMajor.getName();
		for(TClass tClass : tMajor.getTClasses()){
			ClassInfo classInfo = new ClassInfo();
			this.classInfos.add(classInfo.getIns(tClass));
		}
		return this;
	}
}
